var users = [
	{id:1, name:"张三"},
	{id:2, name:"小红"},
	{id:3, name:"小明"},
	{id:4, name:"李四"}
]

Array.prototype.myFind = function(searchFunc){
	for (var i = 0; i < this.length; i++) {
		if (searchFunc(this[i], i)) {
			return this[i]
		}
	}
}

var user = users.myFind(function(item, index){
	return item.id === 3
})

console.log(user)